<template>
  <div id="a">
    <h4>绑定成功</h4>
    <table>
      <tr>
        <td>年级 :</td>
        <td v-model="studentGrade">{{studentGrade}}</td>
      </tr>
      <tr>
        <td>班级 :</td>
        <td v-model="studentClass">{{studentClass}}</td>
      </tr>
      <tr>
        <td>姓名 :</td>
        <td v-model="studentName">{{studentName}}</td>
      </tr>
      <tr>
        <td>学号 :</td>
        <td v-model="studentNo">{{studentNo}}</td>
      </tr>
    </table>
    <div style="margin-top: 10px;">
      <button @click="bindCon">继续绑定</button><br>
      <button @click="reserve">开始预定</button>
    </div>


  </div>
</template>

<script>
  import axios from 'axios'
  
    export default {
      name: "BindContinue",
      

      data(){
          return{
              studentGrade:this.$route.params.studentGrade,
              studentClass:this.$route.params.studentClass,
              studentName:this.$route.params.studentName,
              studentNo:this.$route.params.studentNo,

           
          }
      },


      // watch: {
      //   '$route': function () {
      //     this.studentGrade = this.$route.params.studentGrade;
      //     this.studentClass = this.$route.params.studentClass;
      //     this.studentName = this.$route.params.studentName;
      //     this.studentNo = this.$route.params.studentNo;
      //   }
      // },
       methods:{
      //   created1() {
      //     this.studentGrade=this.$route.params.studentGrade;
      //     this.studentClass=this.$route.params.studentClass;
      //     this.studentName=this.$route.params.studentName;
      //     this.studentNo=this.$route.params.studentNo;
      //   },
        bindCon(){
            this.$router.replace("/BindStudent");
            //axios.post().then().catch()
          },
        reserve(){
          this.$router.replace("/OrderHome");
          //axios.post().then().catch()
        },
   
      }

      // watch: {
      //   '$route': 'created1'
      // },

    }

</script>

<style scoped>
  html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-style: sans-serif;
  }

  body {
    width: 100%;
    height: 100%;
    font-family: 'Open Sans', sans-serif;
    margin: 0;

  }
  #a{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 500px;
    /* border: 1pt seagreen solid;  */
    text-align: center;
    margin: -150px 0 0 -150px;
    background-color: lightblue;

  }

  button {
    width: 100px;
    height: 32px;
    text-align: center;
    /* display: block; */
    background-color: #4a77d4;
    border: 1px solid #3762bc;
    color: #fff;
    /* padding: 9px 14px; */
    font-size: 15px;
    line-height: 32px;
    border-radius: 5px;
    margin-top: 30px;
  }

  table{

    width: 300px;
    height: 200px;
  }
  td{
    text-align: center;
  }
</style>
